package cn.b.sky.mes.mm.model;

import java.io.Serializable;

import cn.b.sky.common.model.ImeCommon;
import org.apache.commons.lang3.StringUtils;
import cn.b.sky.user.SecurityContextUtil;

/**
 * 
 * <strong>Title : Distributionmode.java<br></strong>
 * <strong>Package : cn.b.sky.mes.cm.model<br></strong>
 * <strong>Description : </strong>物料配送形式<br> 
 * <strong>Create on : 2016-9-9 上午9:46:29<br></strong>
 * <p>
 * @author ZhiPeng.Tong<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人|修改日期|修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class Distributionmode extends ImeCommon implements Serializable{
 
	 /**
	   * serialVersionUID
	   */
	  private static final long serialVersionUID = 1L;

	  /**
	   * 配送方式编号
	   */
	  private String distributionModeCode;

	  /**
	   * 配送方式描述
	   */
	  private String distributionModeText;

	  /**
	   * 锁定标志:NUMBER(1)
	   */
	  private int lockFlag;

	public String getDistributionModeCode() {
		return StringUtils.upperCase(distributionModeCode);
	}

	public void setDistributionModeCode(String distributionModeCode) {
		this.distributionModeCode = distributionModeCode;
	}

	public String getDistributionModeText() {
		return distributionModeText;
	}

	public void setDistributionModeText(String distributionModeText) {
		this.distributionModeText = distributionModeText;
	}

	public int getLockFlag() {
		return lockFlag;
	}

	public void setLockFlag(int lockFlag) {
		this.lockFlag = lockFlag;
	}

	  @Override
	  public String getSiteCode() {
	    if (StringUtils.isEmpty(super.getSiteCode())) {
	      return SecurityContextUtil.getSiteCode();
	    }
	    return super.getSiteCode();
	  }

}
